package com.stylefeng.guns.rest.common.persistence.model;

import java.io.Serializable;

import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

/**
 * <p>
 * 用户资金记录表
 * </p>
 *
 * @author ruiyifeng123
 * @since 2019-04-02
 */
@TableName("wz_user_finance_record")
public class WzUserFinanceRecord extends Model<WzUserFinanceRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.ID_WORKER)
    private Long id;
    /**
     * 用户编号
     */
    @TableField("user_code")
    private Long userCode;
    /**
     * 金额
     */
    private Integer amount;
    /**
     * 手续费
     */
    private Integer fee;
    /**
     * 内部交易号
     */
    @TableField("trade_no")
    private String tradeNo;
    /**
     * 外部交易号
     */
    @TableField("out_trade_no")
    private String outTradeNo;
    /**
     * 支付方式:1-alipay;2-weixin;3-wz
     */
    @TableField("pay_method")
    private Integer payMethod;
    /**
     * 类型：0-in-入账；1-out-出账
     */
    private Integer type;
    /**
     * 1-邀请码收益；2-广告收益；3-抽奖支出；4-支付宝充值；5-微信充值；6-支付宝提现；7-微信提现；8-调查问卷收益；9-购买商品；10-线下充值；11-失效广告余额退还;
     */
    @TableField("pay_type")
    private Integer payType;
    /**
     * 目标
     */
    @TableField("target_id")
    private String targetId;
    /**
     * 0-待交易；1-交易成功；2-交易失败;3-待审核；
     */
    private Integer status;
    /**
     * 标题
     */
    private String title;
    /**
     * 备注
     */
    private String remark;
    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;
    /**
     * 交易时间
     */
    @TableField("pay_time")
    private Date payTime;
    /**
     * 管理员id
     */
    @TableField("modifier_id")
    private Integer modifierId;
    /**
     * 管理员姓名
     */
    @TableField("modifier_name")
    private String modifierName;
    /**
     * 现金余额
     */
    @TableField("cash_balance")
    private Integer cashBalance;
    /**
     * 积分余额
     */
    @TableField("reward_balance")
    private Integer rewardBalance;
    /**
     * 总收益
     */
    private Integer profit;
    /**
     * 购买用户id：微信-openid；支付宝-buyerId
     */
    @TableField("buyer_id")
    private String buyerId;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUserCode() {
        return userCode;
    }

    public void setUserCode(Long userCode) {
        this.userCode = userCode;
    }

    public Integer getAmount() {
        return amount;
    }

    public void setAmount(Integer amount) {
        this.amount = amount;
    }

    public Integer getFee() {
        return fee;
    }

    public void setFee(Integer fee) {
        this.fee = fee;
    }

    public String getTradeNo() {
        return tradeNo;
    }

    public void setTradeNo(String tradeNo) {
        this.tradeNo = tradeNo;
    }

    public String getOutTradeNo() {
        return outTradeNo;
    }

    public void setOutTradeNo(String outTradeNo) {
        this.outTradeNo = outTradeNo;
    }

    public Integer getPayMethod() {
        return payMethod;
    }

    public void setPayMethod(Integer payMethod) {
        this.payMethod = payMethod;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getPayType() {
        return payType;
    }

    public void setPayType(Integer payType) {
        this.payType = payType;
    }

    public String getTargetId() {
        return targetId;
    }

    public void setTargetId(String targetId) {
        this.targetId = targetId;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getPayTime() {
        return payTime;
    }

    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }

    public Integer getModifierId() {
        return modifierId;
    }

    public void setModifierId(Integer modifierId) {
        this.modifierId = modifierId;
    }

    public String getModifierName() {
        return modifierName;
    }

    public void setModifierName(String modifierName) {
        this.modifierName = modifierName;
    }

    public Integer getCashBalance() {
        return cashBalance;
    }

    public void setCashBalance(Integer cashBalance) {
        this.cashBalance = cashBalance;
    }

    public Integer getRewardBalance() {
        return rewardBalance;
    }

    public void setRewardBalance(Integer rewardBalance) {
        this.rewardBalance = rewardBalance;
    }

    public Integer getProfit() {
        return profit;
    }

    public void setProfit(Integer profit) {
        this.profit = profit;
    }

    public String getBuyerId() {
        return buyerId;
    }

    public void setBuyerId(String buyerId) {
        this.buyerId = buyerId;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "WzUserFinanceRecord{" +
        "id=" + id +
        ", userCode=" + userCode +
        ", amount=" + amount +
        ", fee=" + fee +
        ", tradeNo=" + tradeNo +
        ", outTradeNo=" + outTradeNo +
        ", payMethod=" + payMethod +
        ", type=" + type +
        ", payType=" + payType +
        ", targetId=" + targetId +
        ", status=" + status +
        ", title=" + title +
        ", remark=" + remark +
        ", createTime=" + createTime +
        ", payTime=" + payTime +
        ", modifierId=" + modifierId +
        ", modifierName=" + modifierName +
        ", cashBalance=" + cashBalance +
        ", rewardBalance=" + rewardBalance +
        ", profit=" + profit +
        ", buyerId=" + buyerId +
        "}";
    }
}
